import request from '/@/utils/request';
export const getPage = (query: any) =>
	request({
		url: '/upms/user/page',
		method: 'get',
		params: query,
	});

export const getById = (id: string) =>
	request({
		url: '/upms/user/' + id,
		method: 'get',
	});

export const addObj = (data: any) =>
	request({
		url: '/upms/user',
		method: 'post',
		data,
	});

export const editObj = (data: any) =>
	request({
		url: '/upms/user',
		method: 'put',
		data,
	});

export const delObj = (id: string) =>
	request({
		url: '/upms/user/' + id,
		method: 'delete',
	});

export const checkPhoneCount = (query: any) =>
	request({
		url: '/upms/user/check/phone',
		headers: {
			isToken: false,
		},
		method: 'get',
		params: query,
	});

export const editPassword = (data: any) =>
	request({
		url: '/upms/user/password',
		method: 'post',
		data,
	});
